package com.session05;

public class Employee {
    private String name;
    private String address;
    private int SSN;
    private int number;
    public static int counter;//计数器

    public Employee(String name, String address, int SSN) {
        System.out.println("正在创建⼀个Employee");
        this.name = name;
        this.address = address;
        this.SSN = SSN;
        this.number = ++counter;
    }

    public void mailCheck() {
        System.out.println("邮寄⽀票到 " + name + ", number " + number);
    }

    public static int getCounter() {
        System.out.println("在getCounter⽅法内");
        return counter;
    }
}
